package com.luoran.car.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 支付订单表
 * @TableName sys_car_order
 */
@TableName(value ="sys_car_order")
@Data
public class SysCarOrder implements Serializable {
    /**
     * 订单主键
     */
    @TableId(type = IdType.AUTO)
    private Integer orderId;

    /**
     * 订单编号
     */
    private String orderNum;

    /**
     * 订单名称
     */
    private String orderSubject;

    /**
     * 订单金额
     */
    private BigDecimal orderPrice;


    private BigDecimal cashPledge;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 用户外键
     */
    private Integer userId;


    @TableField(exist = false)
    private String customerName;

    @TableField(exist = false)
    private String make;

    @TableField(exist = false)
    private String model;

    @TableField(exist = false)
    private String color;

    @TableField(exist = false)
    private String licensePlate;
    /**
     * 车辆外键
     */
    private Integer carId;

    private Integer couponId;

    /**
     * 订单状态
     */
    private String status;

    /**
     * 开始租车时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    /**
     * 结束租车时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
